import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/purchase/purchase-inbound/list`,
      method: 'post',
      data
    })
  },
  // 调整
  adjust(data) {
    return request({
      url: `/v1/purchase/purchase-inbound/adjust`,
      method: 'post',
      data
    })
  },
  // 统计
  total(data) {
    return request({
      url: `/v1/purchase/purchase-inbound/total`,
      method: 'post',
      data
    })
  },
  // 生成开票清单统计
  billing(data) {
    return request({
      url: `/v1/purchase/purchase-inbound/process-billing`,
      method: 'post',
      timeout: 120000,
      returnData: true,
      data
    })
  },
  // 接收WMS的采购入库数据
  create(data) {
    return request({
      url: `/v1/purchase/purchase-inbound/create`,
      method: 'post',
      data
    })
  },
  // 无需生成开票清单
  updateIsBilling(data) {
    return request({
      url: `/v1/purchase/purchase-inbound/update-is-billing`,
      method: 'post',
      data
    })
  },
}
